package com.ruoyi.system.controller;


import com.ruoyi.system.domain.Personne;
import com.ruoyi.system.domain.PersonnelUser;
import com.ruoyi.system.service.IPersonnelUserService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/personne")
public class personneController {
    private String prefix = "system/personne";

    @Resource
    private IPersonnelUserService iPersonnelUserService;

    @RequiresPermissions("system:market:view")
    @GetMapping()
    public String dept()
    {
        System.out.println("跳转");
        return prefix + "/index";
    }
    @PostMapping("/list")
    @ResponseBody
    public Map<String, List<Personne>> index(){
        Map<String, List<Personne>> map=new HashMap<>();
        map.put("personneList",iPersonnelUserService.personneList());
        map.put("personneList2",iPersonnelUserService.personneList2());
        map.put("personneList3",iPersonnelUserService.personneList3());
        map.put("personneList4",iPersonnelUserService.personneList4());
        map.put("personneList5",iPersonnelUserService.personneList5());
        return map;
    }

}
